home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Gooey 2.xpl < prev    next >
Text File  |  1999-09-13  |  4KB  |  136 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Internet\Instant Messaging\GOOEY"
  5. "NAME"="General Settings"
  6. "VERSION"="1.02"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Configure connect port automatically (default: on)"
  9. "TEXT 2"="Enable Proxy Server"
  10. "TEXT 3"="Start Gooey on startup of Windows"
  11. "TEXT 4"="Connect to Gooey when opening browser"
  12. "DESCRIPTION 1"="Some more options for Gooey."
  13. "DESCRIPTION 2"="Gooey may be obtained at http://www.gooey.com/"
  14. "AUTHOR"="Xteq Systems"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  17. "COMMENT 2"="Thanks to CptSiskoX for the settings and the idea."
  18.  
  19.  
  20. '-- ONLY CHANGE THE LINES WITHOUT ' at the beginning !!
  21. '
  22. '*** Xteq Systems "On/Off" Plug-in Template ***
  23. '*** ID_XQ_PT1 V1.00 
  24.  
  25.  ' how many settings are in this file (change "COUNT=" also!) 
  26.  CountSettings=4
  27.  
  28.  ' does this plug-in requires the user to logoff or to restart his PC?
  29.  bRequireLogoff=False
  30.  bRequireRestart=False
  31.  
  32.  ' if this path exists in the registry, the plug-in will be enabled. if it does
  33.  ' not exist, the plug-in will be disable set to ="" to ignore this check and alway
  34.  ' enable the plug-in, regardless if the path exists or not
  35.  sCheckPath="HKCU\Software\Hypernix\Gooey\"
  36.  
  37.  
  38.  ' Settings for Value # 1
  39.  sV1_Path="HKCU\Software\Hypernix\Gooey\Network\UseAutoPort" 
  40.  sV1_OnValue="1"      'what is the "ON" value (e.g. "1", "True", "On" etc.)
  41.  sV1_OffValue="0"      'what is the "OFF" value (e.g. "0", "False", "Off" etc.)
  42.  sV1_DataType="2"     'datatype of this value (REG_STRING=1, REG_DWORD=2, REG_BINARY=3, REG_EXPAND_SZ=4)
  43.  
  44.  ' Settings for Value # 2
  45.  sV2_Path="HKCU\Software\Hypernix\Gooey\Network\ProxyEnable" 
  46.  sV2_OnValue="1"      
  47.  sV2_OffValue="0"      
  48.  sV2_DataType="2"     
  49.  
  50.  ' Settings for Value # 3
  51.  sV3_Path="HKCU\Software\Hypernix\Gooey\Environment\OpenNixOnStart" 
  52.  sV3_OnValue="1"      
  53.  sV3_OffValue="0"      
  54.  sV3_DataType="2"     
  55.  
  56.  ' Settings for Value # 4
  57.  sV4_Path="HKCU\Software\Hypernix\Gooey\Environment\ConnectOnStart" 
  58.  sV4_OnValue="1"      
  59.  sV4_OffValue="0"      
  60.  sV4_DataType="2"     
  61.  
  62.  ' Settings for Value # 5
  63.  sV5_Path="HKCU\Software\Hypernix\Gooey\Network\AllwaysOntop" 
  64.  sV5_OnValue="1"      
  65.  sV5_OffValue="0"      
  66.  sV5_DataType="2"     
  67.  
  68. '*** Xteq Systems "On/Off" Plug-in Template ***
  69. '
  70. '-- STOP CHANGES HERE !!
  71.  
  72.  
  73.  
  74. Sub Plugin_Initialize 
  75.  If Len(sCheckPath)>0 then
  76.     if left(sCheckPath,1)<>"\" then sCheckPath=sCheckPath & "\"
  77.  
  78.     b=RegPathExists(sCheckPath)
  79.     if b=true then
  80.        Call ReadSettings
  81.     else
  82.        Call Disable
  83.     end if  
  84.  else
  85.     Call ReadSettings
  86.  end if
  87. End Sub
  88.  
  89. Sub ReadSettings
  90.                            Call ReadSettingsEx(1,sV1_Path,sV1_OnValue)
  91.   if CountSettings>=2 then Call ReadSettingsEx(2,sV2_Path,sV2_OnValue)
  92.   if CountSettings>=3 then Call ReadSettingsEx(3,sV3_Path,sV3_OnValue)
  93.   if CountSettings>=4 then Call ReadSettingsEx(4,sV4_Path,sV4_OnValue)
  94.   if CountSettings>=5 then Call ReadSettingsEx(5,sV5_Path,sV5_OnValue)
  95. End Sub
  96.  
  97. Sub ReadSettingsEx(ID,REGP,VALON)
  98.  s=RegReadValue(REGP)
  99.  'Call DebugMsg("VAL:" & s & " ID:" & ID & " VAL_ON:" & VALON)
  100.  if CStr(s)=VALON then
  101.     Call SetUIElement(ID,true)
  102.  End if 
  103. End Sub
  104.  
  105.  
  106. Sub Plugin_CheckData(ElementIndex)
  107. End Sub
  108.  
  109.  
  110. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  111.                           Call WriteSettings(GetUIElement(1),sV1_Path,sV1_OnValue,sV1_OffValue,sV1_DataType)
  112.  if CountSettings>=2 then Call WriteSettings(GetUIElement(2),sV2_Path,sV2_OnValue,sV2_OffValue,sV2_DataType)
  113.  if CountSettings>=3 then Call WriteSettings(GetUIElement(3),sV3_Path,sV3_OnValue,sV3_OffValue,sV3_DataType)
  114.  if CountSettings>=4 then Call WriteSettings(GetUIElement(4),sV4_Path,sV4_OnValue,sV4_OffValue,sV4_DataType)
  115.  if CountSettings>=5 then Call WriteSettings(GetUIElement(5),sV5_Path,sV5_OnValue,sV5_OffValue,sV5_DataType)
  116.  
  117.  
  118.  if bRequireLogoff then Logoff()
  119.  if bRequireRestart then Restart()
  120. End Sub
  121.  
  122. Sub WriteSettings(CUR_VAL,REGP,ON_VAL,OFF_VAL,DAT_TYPE)
  123.   if CUR_VAL=true then
  124.      Call RegWriteValue(REGP,ON_VAL,DAT_TYPE)
  125.   else
  126.      Call RegWriteValue(REGP,OFF_VAL,DAT_TYPE)
  127.   end if
  128. End Sub
  129.  
  130.  
  131. Sub Plugin_Terminate 
  132. End Sub
  133.  
  134.  
  135.  
  136.